---
title: "Sentry"
sidebarTitle: "Sentry Provider"
description: "Sentry provider allows you to query Sentry events and to pull/push alerts from Sentry"
---

## Inputs

- `time: str = "14d"`: The time range for the query (e.g., `1d`)
- `project: str`: The project to query on.

## Authentication Parameters

The `api_key` and `organization_slug` are required for connecting to the Sentry provider. You can obtain them as described in the "Connecting with the Provider" section.

`project_slug` is if you want to connect Sentry to a specific project within an organization.

<Note>
To connect self hosted Sentry, you need to set the `api_url` parameter. Default value is `https://sentry.io/api/0/`.
</Note>

## Connecting with the Provider

### API Key

To obtain the Sentry API key, follow these steps ([Docs](https://docs.sentry.io/product/integrations/integration-platform/?original_referrer=https%3A%2F%2Fwww.google.com%2F#internal-integrations)):

1. Log in to your Sentry account.
2. Navigate `Settings` -> `Developer Settings` section.
3. Click on `Custom integrations`.
4. Click on `Create New Integration` on the top right side of the screen.
5. Select `Internal Integration` and click `Next`
6. Give the integration an indicative name, e.g. `Keep Integration`
7. From the permission section, select the required scopes as defined at the bottom of this page.
8. Click `Save Changes`
9. Scroll down to the bottom of the screen to the `TOKENS` section and copy the generated token -- This is the API key you will be using in Keep.

### Organization Slug

You can find the Organization Slug in your Sentry URL.
For example, this is our playground account: `https://keep-dr.sentry.io/` - The organization slug is `keep-dr`.

To obtain the Organization Slug from the settings page:

1. Log in to your Sentry account.
2. Navigate `Settings` -> `General Settings`.
3. Copy the Organization Slug from the Organization Slug input.

## Scopes

Certain scopes may be required to perform specific actions or queries via the Sentry Provider. Below is a summary of relevant scopes and their use cases:

- `event:read`
  | Required: `True`
  | Description: `Read events and issues.`
- `project:read`
  | Required: `True`
  | Description: `Read projects in organization`
- `project:write`
  | Required: `False`
  | Description: `Write permission for projects in an organization.` (\*_Required for auto-webhook integration_)

## Notes

<Note>
When installing Sentry webhook integration, Keep enables built-in Webhook integration to all accessible projects and adds a new Alert that has an `Action` to send a notification via Webhooks to all accessible projects.

You can achieve alerts pushing from Sentry to Keep using an `Internal Integration` which is not automated via the platform. [Contact us](mailto:founder@keephq.dev) to set it up.

</Note>

## Useful Links

- [Sentry Integration Platform](https://docs.sentry.io/product/integrations/integration-platform/)
- [Sentry API Reference](https://docs.sentry.io/api/)
